<?
session_start();
require_once 'php/functions.php';
require_once 'php/connect.php';

$userName = $_SESSION['userName'];
$newMsg = getNewMessages();
if($newMsg == 0){
	$newMsg = "";
}else{
	$newMsg = " (".$newMsg.")";
}
$output = "
<html>
	<head>	 	
		<!-- User Message Window -->

	</head>
	<body>
	<script>
		$(document).ready(function(){
			$('.show-user').click(function(e) {	
				var clicked = jQuery(e.target);
				var id = clicked.attr('id');
				getUser(id);
			});
		});
						
						
				
	</script>
	<div class = 'content-title-container'>
		<div id='".$userName."' class='show-user cur-point normal-text blue-text content-title-text fl-left' >".$userName."</div><div class='normal-text grey-text content-title-text fl-left' style='margin-left: 5px;'> 's home</div>
			<ul id='sub-menu-item-list'><li class='menu-item bold-text'>Specs</li><li class='menu-item bold-text'>Profile</li><li class='menu-item bold-text menu-item-selected'>Messages".$newMsg."</li></ul>
			<script>
				enableMenu();
			</script>
		</div>
		<div id='indent-content-container' class='me-content-container'> 
			<div id='message-list-container' class=''>
				<div class = 'content-subtitle-container-left fl-left' style='height: 235px;'></div>
				<div class='fl-right'>
					<div id='message-list' class='fl-left' style='width: 763px;padding-top: 10px;padding-bottom: 10px;height: 116px;'></div>
					<script>
						loadMessageList(0);
					</script>
					<div class = 'content-subtitle-container-right fl-right' style='height: 235px;'></div>
				</div>
			</div>
			<div style='clear:both; height:5px;'></div>
			<div class = 'content-subtitle-container-open'></div>
			<div id='message-convo-out' style='min-height:428px;'>
				<div id='message-convo' class='spec-comments'>
				</div>
			</div>
			<div class = 'content-subtitle-container-close'></div>
		</div>
	</body>
</html>";

		
echo $output;
?>


		
